/*
 脚本功能：商店
 */

var a = 0;
var icon = "#fUI/UIWindow/Quest/icon2/7#";
var ttt = "#fUI/UIWindow/Quest/icon2/7#";//"+ttt+"//美化1
var jzs2 = "#fUI/GuildMark.img/Mark/Animal/00002002/15#";//家族小兔子
var xxx = "#fEffect/CharacterEff/1082565/2/0#"; //星系
var ob1 = "#fEffect/SetEff/102/effect/7#";//PPMS鸟右
var ob2 = "#fEffect/SetEff/102/effect/7#";//PPMS鸟左
var F114 = "#fUI/NameTag.img/157/w#";//小兔子戒指头部、
var ob14 = "#fUI/UIWindow2.img/Item/timeLimit/0#";//小闹钟
function start() {
    a = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 1)
            a++;
        else
            a--;
        if (a == -1) {
            cm.dispose();
        } else if (a == 0) {
            cm.sendSimple(" " + ob1 + "#r#e欢迎来到" + cm.getServerName() + "万能商店" + ob2 + "\r\n#k#n      如果有什么遗漏的物品可以联系管管添加哦" + "#b#n\r\n#L0# " + ob14 + " #b#e杂货商店#l #L4# " + ob14 + " 新手装备 #L878712# " + ob14 + " 全职副手 \r\n#L76883# " + ob14 + " #r标箭弩失 #L878713# " + ob14 + " 特别道具 #L2221# " + ob14 + " 飞侠双刀 \r\n#L7655# " + ob14 + " #b尖兵商店 #L7666# " + ob14 + " 狂龙战士 #L7677# " + ob14 + " 爆莉天使 \r\n#L7688# " + ob14 + " #r米神专用 #L7699# " + ob14 + " 恶魔复仇 #L7700# " + ob14 + " 志玲姐姐 \r\n#L76881# " + ob14 + " #b超能力者 #L76882# " + ob14 + " 战国双废 #L1033001# " + ob14 + " 双弩精灵 \r\n#L7653# " + ob14 + " #r怪盗幻影 #L1# " + ob14 + " #r火炮专用 #L7654# " + ob14 + " 夜光法师\r\n#L6# " + ob14 + " #b口袋装备 #L7# " + ob14 + " 必成卷轴 #L8# " + ob14 + " RED币商店\r\n#L9# " + ob14 + " #r徽章商店#l #L22# " + ob14 + " #g坐骑商店#l #L23##b " + ob14 + " #r星岩商店#l  \r\n#L889##b " + ob14 + " 安卓商店#l #L887##b " + ob14 + " 灵魂宝珠#l #L5# " + ob14 + " 布莱克缤#l  #L5124110# " + ob14 + " #r配方制作#l #L5124111# " + ob14 + " 贝·勒德#l #L5124112# " + ob14 + " 怀旧の枫\r\n")
        } else if (a == 1) {
            if (selection == 0) {
                cm.openShop(61);
                cm.dispose();
            } else if (selection == 1) {//防具商店
                cm.openShop(308);
                cm.dispose();
            } else if (selection == 38985) {//魔影链式
                cm.openShop(402);
                cm.dispose();
            } else if (selection == 38985) {//圣经
                cm.openShop(1110);
                cm.dispose();
            } else if (selection == 7654) {//防具商店
                cm.openShop(313);
                cm.dispose();
            } else if (selection == 2221) {//防具商店
                cm.openShop(16);
                cm.dispose();
                cm.dispose();
            } else if (selection == 7655) {//防具商店
                cm.openShop(325);
                cm.dispose();
            } else if (selection == 7666) {//防具商店
                cm.openShop(323);
                cm.dispose();
            } else if (selection == 76883) {//防具商店
                cm.openShop(64);
                cm.dispose();
            } else if (selection == 7677) {//防具商店
                cm.openShop(324);
                cm.dispose();
            } else if (selection == 7688) {//防具商店
                cm.openShop(321);
                cm.dispose();
            } else if (selection == 7699) {//防具商店
                cm.openShop(307);
                cm.dispose();
            } else if (selection == 878712) {//防具商店
                cm.openShop(63);
                cm.dispose();
                cm.dispose();
            } else if (selection == 878713) {//防具商店
                cm.openShop(60);
                cm.dispose();
                cm.dispose();
            } else if (selection == 7699) {//防具商店
                cm.openShop(307);
                cm.dispose();
            } else if (selection == 7700) {//武器商店
                cm.openShop(73);
                cm.dispose();
            } else if (selection == 76881) {//武器商店
                cm.openShop(55);
                cm.dispose();
            } else if (selection == 76882) {//武器商店
                cm.openShop(305);
                cm.dispose();
            } else if (selection == 7653) {//武器商店
                cm.openShop(1400001);
                cm.dispose();
            } else if (selection == 3) {//武器商店
                cm.openShop(64);
                cm.dispose();
            } else if (selection == 4) {//武器商店
                cm.openShop(62);
                cm.dispose();
            } else if (selection == 5) {//武器商店
                cm.openShop(312);
                cm.dispose();
            } else if (selection == 6) {//副手
                cm.openShop(303);
                cm.dispose();
            } else if (selection == 7) {//武器商店
                cm.dispose();
                cm.openShop(350);
            } else if (selection == 8) {//RED
                cm.dispose();
                cm.openShop(69);
            } else if (selection == 9) {//运动币
                cm.dispose();
                cm.openShop(74);
            } else if (selection == 22) {//勋章商店boss商店
                cm.dispose();
                cm.openShop(40);
            } else if (selection == 23) {//星岩
                cm.dispose();
                cm.openShop(401);
            } else if (selection == 887) {//灵魂宝珠
                cm.dispose();
                cm.openShop(326);
            } else if (selection == 81811) {//双弩商店
                cm.dispose();
                cm.openShop(1033001);
            } else if (selection == 889) {//安卓商店
                cm.dispose();
                cm.openShop(310);
            } else if (selection == 5124110) {//配方商店
                cm.dispose();
                cm.openShop(328);
            } else if (selection == 5124111) {//贝勒德
                cm.dispose();
                cm.openShop(68);
            } else if (selection == 5124112) {//怀旧枫叶装备
                cm.dispose();
                cm.openShop(352);
            } else if (selection == 10) {//返回
                cm.dispose();
                cm.openNpc(9010000);
            } else {
                // 1012123 杂货商店 x
                //10 低级防具L
                //11 50~60级防具
                //12 60~70级防具
                //20 低级武器
                //21 50~60级武器
                //22 60~70级武器
                // 3 其他道具 
                // 4 卷轴商店 x 
                // 1012125 宠物商店
                // 6 辅助武器
                cm.openShop(selection);
                cm.dispose();
            }
        } else if (a == 2) {
            switch (selection) {
                case 0://低级防具
                    //cm.openShop(10)
                    cm.sendOk("暂时未开放。")
                    break;
                case 1://50~60级防具
                    cm.openShop(11)
                    break;
                case 2://60~70级防具
                    cm.openShop(12)
                    break;
                case 3://低级武器
                    //cm.openShop(20)
                    cm.sendOk("暂时未开放。")
                    break;
                case 4://50~60级武器
                    cm.openShop(21)
                    break;
                case 5://60~70级武器
                    cm.openShop(22)
                    break;
            }
            cm.dispose();
        }//a
    }//mode
}//f